package com.ym9527.entity;


import lombok.Data;

import javax.persistence.*;

/**
 * 这是记录课程有哪些学生的表
 */
@Entity()
@Data
@Table(name = "school_course_student")
public class CourseStudent {

    @TableGenerator(
            name="ID_GENERATOR",
            table="ID_GEN",
            pkColumnName = "GEN_NAME",
            pkColumnValue = "COURSE_STUDENT_PK",
            valueColumnName = "GEN_VALUE",
            initialValue = 1,
            allocationSize = 1
    )
    @GeneratedValue(strategy= GenerationType.TABLE, generator="ID_GENERATOR")
    @Id
    @Column(name = "course_student_id",length = 50)
    private Long  courseStudentId;

    /**
     * 这是课程id
     */
    @Column(name = "course_id")
    private Long courseId;

    /**
     * 这是学生ID
     */
    @Column(name = "student_id")
    private Long studentId;

}
